#define DEBUG
#include <cstdio>

using namespace std;

typedef unsigned long long ll;

const int maxn=100000, maxm=500;
const ll mods=998244353;

ll qpower(ll a, int n) {
  ll s=1;
  for (; n>1; n/=2) {
    if (n%2) {
      s = s*a%mods;
    }
    a = a*a%mods;
  }
  return a*s%mods;
}

ll fact[maxm+1], unfact[maxm+1], frac;

void initFact(int n) {
  fact[0] = 1;
  for (int i=1; i<=n; i++) {
    fact[i] = fact[i-1]*i%mods;
  }
  unfact[n] = qpower(fact[n], mods-2);
  for (int i=n; i>0; i--) {
    unfact[i-1] = unfact[i]*i%mods;
  }
}

ll calcC(int n, int m) {
  if (n>m) {
    return 0;
  }
  return fact[m]*unfact[n]%mods*unfact[m-n]%mods;
}

class Tree {
public:
  static const int maxk=17;
  int n, m, ind[maxn+1], to[2*maxn+1], link[2*maxn+1], f[maxn+1], dep[maxn+1];
  ll up[maxn+1][maxk+1][2], val[2*maxn+1];

  void addSide(int u, int v, ll w) {
    m++;
    to[m] = v;
    val[m] = w;
    link[m] = ind[u];
    ind[u] = m;
  }

  ll build(int o, int fa, int din, int fod) {
    ll ret=0;
    dep[o] = dep[fa]+1;
    for (int i=ind[o]; i; i=link[i]) {
      if (to[i]!=fa) {
	up[to[i]][0][0] = o;
	up[to[i]][0][1] = val[i];
	ret = (ret+build(to[i], o, din, fod))%mods;
	ll p= (calcC(fod, din)+3*mods-
	       calcC(fod, f[to[i]])-
	       calcC(fod, din-f[to[i]]))%mods*frac%mods;
	ret = (ret+2*p%mods*val[i]%mods)%mods;
	f[o] += f[to[i]];
      }
    }
    return ret;
  }

  void makeUp() {
    for (int j=1; j<=maxk; j++) {
      for (int i=1; i<=n; i++) {
	int t=up[i][j-1][0];
	up[i][j][0] = up[t][j-1][0];
	up[i][j][1] = up[i][j-1][1]+up[t][j-1][1];
      }
    }
  }

  ll dis(int u, int v) {
    ll ret;
    if (dep[u]<dep[v]) {
      ret = u, u = v, v = ret;
    }
    ret = 0;
    for (int i=maxk; i>=0; i--) {
      if (dep[up[u][i][0]]>=dep[v]) {
	ret += up[u][i][1];
	u = up[u][i][0];
      }
    }
    if (u==v) {
      return ret;
    }
    for (int i=maxk; i>=0; i--) {
      if (up[u][i][0]!=up[v][i][0]) {
	ret += up[u][i][1]+up[v][i][1];
	u = up[u][i][0], v = up[v][i][0];
      }
    }
    return ret+up[u][0][1]+up[v][0][1];
  }
};

int main () {
  freopen("meal.in", "r", stdin);
  freopen("meal.out", "w", stdout);

  static Tree tree;
  static int dinner[maxm+1];
  int n, m, k;
  scanf("%d %d %d", &n, &m, &k);
  tree.n = n;
  for (int i=1; i<=m; i++) {
    scanf("%d", dinner+i);
    tree.f[dinner[i]]++;
  }
  for (int i=1; i<n; i++) {
    int u, v;
    ll w;
    scanf("%d %d %llu", &u, &v, &w);
    tree.addSide(u, v, w);
    tree.addSide(v, u, w);
  }

  initFact(m);
  frac = qpower(calcC(k, m), mods-2);

  static ll dis[maxm+1][maxm+1];
  ll ans=tree.build(1, 0, m, k);
  tree.makeUp();
  for (int i=1; i<=m; i++) {
    for (int j=1; j<=m; j++) {
      dis[i][j] = tree.dis(dinner[i], dinner[j]);
    }
  }
  for (int i=1; i<m; i++) {
    for (int j=i+1; j<=m; j++) {
      int cnt=2;
      ll disij=dis[i][j];
      for (int k=1; k<=m; k++) {
	ll disik = dis[i][k], disjk = dis[j][k];
	cnt += k!=i && k!=j &&
	  ((disik<disij || (disik==disij && k>j)) &&
	   (disjk<disij || (disjk==disij && k>i)));
      }
      if (cnt>=k) {
	ans = (ans+mods-disij%mods*calcC(k-2, cnt-2)%mods*frac%mods)%mods;
      }
    }
  }

  printf("%llu", ans);

  fclose(stdin);
  fclose(stdout);
  return 0;
}
